<?php

namespace App\Http\Requests\Admin\IViewFileUpload;

use App\Http\Requests\ApiRequest;
use Illuminate\Http\UploadedFile;

/**
 * @property UploadedFile file
 * @property string $bos_dir
 */
class FileStoreRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'file'     => 'required|file',
            'bos_dir'   => 'required|string|min:2|max:'.self::MAX_STRING,
        ];
    }

    /**
     * @return array
     */
//    public function messages()
//    {
//        return [
//            'file.*'     => '必须提供上传文件',
//        ];
//    }

}
